#pragma once


#include <Math/Utilities.hpp>


TEST( Utilities, Clamp )
{
	EXPECT_FLOAT_EQ( 0.0f, Math::Clamp( -1.0f, 0.0f, 1.0f ) );
	EXPECT_FLOAT_EQ( 1.0f, Math::Clamp( 2.0f, 0.0f, 1.0f ) );
	EXPECT_FLOAT_EQ( 0.0f, Math::Clamp( 0.5f, 0.0f, 1.0f ) );

	EXPECT_DOUBLE_EQ( 0.0, Math::Clamp( -1.0, 0.0, 1.0 ) );
	EXPECT_DOUBLE_EQ( 1.0, Math::Clamp( 2.0, 0.0, 1.0 ) );
	EXPECT_DOUBLE_EQ( 0.5, Math::Clamp( 0.5, 0.0, 1.0 ) );

	EXPECT_EQ( 0, Math::Clamp( -1, 0, 2 ) );
	EXPECT_EQ( 1, Math::Clamp( 2, 0, 2 ) );
	EXPECT_EQ( 1, Math::Clamp( 1, 0, 2 ) );
}


TEST( Utilities, Lerp )
{
	EXPECT_FLOAT_EQ( 0.5f, Math::Lerp( 0.0f, 1.0f, 0.5f ) );
	EXPECT_FLOAT_EQ( 0.0f, Math::Lerp( 0.0f, 1.0f, 0.0f ) );
	EXPECT_FLOAT_EQ( 1.0f, Math::Lerp( 0.0f, 1.0f, 1.0f ) );
}
